THREAD=-std=c++11 -lpthread
SQL=-I mysql/include -L mysql/lib -l mysqlclient -l pthread -l dl -std=c++11

.PHONY:ALL
ALL:server server_cgi

server:main.cpp
	g++ -o $@ $^ $(THREAD)


server_cgi:server_cgi.cpp
	g++ -o $@ $^ $(SQL) -static

.PHONY:clean
clean:
	rm -f server 
	rm -f root/server_cgi

move:
	mv server_cgi root